package bean;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

//@Component(value="ob")
//@Component("ob")
//@Lazy
//@Lazy(true)
//@Lazy(false)
public class OtherBean {
//	@Value("abc")
	@Value("${str}")
	private String str;
	
//	@Value("123")
	@Value("${var}")
	private int var;
	
	public OtherBean() {
		System.out.println("OtherBean.OtherBean()");
	}
	
	
	public void doOther(){
		System.out.println(str);
		System.out.println(var);
	}
	
	
	
	@PostConstruct
	public void a(){
		System.out.println("OtherBean.a()");
	}
	
	@PreDestroy
	public void b(){
		System.out.println("OtherBean.b()");
	}
	
	
	
	
	
	
	
	
	
}
